Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for composite buildpack targets during publication #221

Merged
merged 2 commits into from
May 9, 2024

Conversation

joshwlewis
Copy link
Member

@joshwlewis joshwlewis commented May 6, 2024

This PR reads [[metadata.targets]] from a composite buildpack's buildpack.toml to determine what targets the composite buildpack is intended to be compiled for.

Why [[metadata.targets]]?

We're not actually sure if [[targets]] is legal as a part of a composite buildpack descriptor, so libcnb.rs has not modeled it as noted here:

https://github.com/heroku/libcnb.rs/blob/a4e48fde0b502eec1ce1d0b811bb1ac61beed101/libcnb-data/src/buildpack/mod.rs#L182-L185

The multi-platform rfc seems to indicate that this will eventually be part of package.toml:

https://github.com/buildpacks/rfcs/blob/abd3ba28d7648e03a9c2074a88dae9fe3b069683/text/0000-multiarch-builders-and-package.md?plain=1#L754-L776

But package.toml is not a part of the spec, and this field isn't implemented in libcnb.rs or pack yet. Using it now would break cargo libcnb package workflows. Setting [[targets]] in package.toml also seems like something that is an output of cargo libcnb package, rather than an input to it.

I don't think metadata.targets will be permanent, but rather a stopgap until multi-arch support lands in pack and libcnb.rs at a future date.

@joshwlewis joshwlewis marked this pull request as ready for review May 9, 2024 15:58
@joshwlewis joshwlewis requested a review from a team as a code owner May 9, 2024 15:58
@edmorley edmorley merged commit acd9dd0 into main May 9, 2024
2 checks passed
@edmorley edmorley deleted the jwl/composite-targets branch May 9, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants